package com.course.entity;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.sun.xml.internal.ws.developer.Serialization;
import lombok.Data;
import lombok.ToString;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Copyright: Copyright (c)  2018-2020 郑州金特莱电子有限公司 All rights reserved.
 * @author: WG
 * @date: 2022/7/5 9:57
 * @Description: TODO
 */
@Data
@ToString
@TableName("dictionaries")
public class Dictionaries {
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(type = IdType.INPUT)
    private Long id;

    @TableField(value = "title", condition = SqlCondition.LIKE)
    private String title;

    @TableField(value = "code")
    private String code;

    @TableField(value = "pid")
    private Long pid;

    @TableField(exist = false)
    private List<Dictionaries>  children = new ArrayList<>();

}
